<div class="layui-tab-item layui-show">
    <div class="openMaterialDraggable" id="Gallery_{$form.field}">
        <?php if(isset($info) && !empty($info) && $info[$form['field']]){;?>
        <?php $images = explode(',',$info[$form['field']]);?>
        {foreach name="$images" item="vo"}
        <div class="material-preview">
            <div class="del-wrap">
                <div style="position: relative">
                    <div class="file-item relative" style="height: 100px; width: 100px;">
                        <div class="el-image image">
                            <img src="{$vo}" class="el-image__inner" style="object-fit: contain;">
                        </div>
                    </div>
                    <div class="drop-down layui-anim layui-anim-downbit" style="display: none">
                        <p class="openShowImg" data-value="{$vo}">查看</p>
                        <p data-val="{$vo}" class="drop-del">删除</p>
                    </div>
                </div>
            </div>
        </div>
        {/foreach}
        <input type="hidden" class="drop-value" id="checkGallery_{$form.field}" name="{$form.field}" value="{$info[$form['field']]}"/>
        <?php }?>
    </div>
    <div class="upload-btn openGallery" data-t="1" data-n="{$form.field}" data-c="{$form.value}"
         style="width: 100px; height: 100px;">
        <i class="layui-icon layui-icon-addition" style="font-size: 25px; --color: inherit;"></i>
        <span>添加</span>
    </div>
</div>

<script id="GalleryTemplate1" type="text/html">
    {{# for(var i=0;i < d.data.length ;i++){ }}
    <div class="material-preview">
        <div class="del-wrap">
            <div>
                <div class="file-item relative" style="height: 100px; width: 100px;">
                    <div class="el-image image">
                        <img src="{{d.data[i]}}" class="el-image__inner" style="object-fit: contain;">
                    </div>
                </div>
                <div class="drop-down layui-anim layui-anim-downbit" style="display: none">
                    <p class="openShowImg" data-value="{{d.data[i]}}">查看</p>
                    <p data-val="{{d.data[i]}}" class="drop-del">删除</p>
                </div>
            </div>
        </div>
    </div>
    {{# } }}
    <input type="hidden" class="drop-value" id="checkGallery_{{d.name}}" name="{{d.name}}" value="{{(d.data).join(',')}}"/>
</script>

